<?php

namespace Admin\Models\server;

use Admin\Models\BaseModel;

class XhserverBox extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=11, nullable=false)
     */
    public $iSBId;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iSchoolId;

    /**
     *
     * @var integer
     * @Column(type="integer", length=11, nullable=true)
     */
    public $iPortNum;

    /**
     *
     * @var string
     * @Column(type="string", length=100, nullable=true)
     */
    public $sBoxIp;

    /**
     *
     * @var string
     * @Column(type="string", length=100, nullable=true)
     */
    public $sBoxWIp;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tStartTime;

    /**
     *
     * @var string
     * @Column(type="string", length=100, nullable=true)
     */
    public $sBoxVersion;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $bServerStatus;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $bNetStatus;

    /**
     *
     * @var integer
     * @Column(type="integer", length=1, nullable=true)
     */
    public $bNotice;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tCreateTime;

    /**
     *
     * @var string
     * @Column(type="string", nullable=true)
     */
    public $tUpdateTime;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        $this->useDynamicUpdate(true);      //动态更新
        $this->keepSnapshots(true);         //快照
//        $this->setSchema("xh_webmanage");
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'XHServer_Box';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return XhserverBox[]|XhserverBox
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return XhserverBox
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }

}
